package com.liushao.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author 陈修华
 * @ClassName BorrowInfoStatusEnum
 * @description: TODO
 * @datetime 2022年 12月 05日 15:10
 * @version: 1.0
 */
@Getter
//@AllArgsConstructor
public enum  BorrowInfoStatusEnum {

    //状态（0：未提交，1：审核中， 2：审核通过， -1：审核不通过）

    NO_BORROW(0,"未认证"),
    BORROW_ING(1,"审核中"),
    BORROW_OK(2,"审核通过"),
    BORROW_FAIL(-1,"审核不通过.."),
    ;

    private Integer status;
    private String msg;

    //写个方法获取认证中
    public static String getMsgStatus(int startus){
        BorrowInfoStatusEnum[] arrObj = BorrowInfoStatusEnum.values();
        for(BorrowInfoStatusEnum obj: arrObj){
            if(startus==obj.getStatus().intValue()){
                return  obj.getMsg();
            }

        }

        return "";
    }

    BorrowInfoStatusEnum(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
